#ifndef PCFDATA_H
#define PCFDATA_H

#include <QObject>
#include <QThread>
#include <pcf8591.h>

#define PCF_TEST 1

#define PCF_ADDRESS  0x48 //0x90 //0x48
#define PCF 64

#define A0  PCF+0 //0x41   //ADC0
#define A1  PCF+1 //0x42  //ADC1
#define A2  PCF+2 //0x43    //ADC2
#define A3  PCF+3 //0x40  //ADC3


class PcfData : public QThread
{
    Q_OBJECT
public:
    explicit PcfData(QObject *parent = NULL);

    virtual ~PcfData();

    void initPcf();


    static PcfData * gestance();

    int readPcf(int channel);
signals:

public slots:

protected:
    void run();



private:
    int m_fd;

};

#endif // PCFDATA_H
